Skip to content

Update GoapPlanner.cs#3

Open
ScottyXIII wants to merge 1 commit intosploreg:masterfrom
ScottyXIII:patch-1
Open

Update GoapPlanner.cs#3
ScottyXIII wants to merge 1 commit intosploreg:masterfrom
ScottyXIII:patch-1

Conversation

@ScottyXIII
Copy link

@ScottyXIII ScottyXIII commented Jan 2, 2019

Hi, not sure if this is still maintained but I come across this code from an article online and found an issue.

When I had no goals assigned I was noticing plans were still being built so I checked and found the inState() function would still return true if it's test parm was empty. The comment says it should return false so I put in a PR.

Was also wonder if there was a reason why you did not use state.Contains(t) rather than looping over state and checking each value? I think the built in Contains() function dose pretty much the same thing?

Hi, not sure if this is still maintained but I come across this code from an article online and found and issue. 

When I had no goals assigned I was noticing plans were still being built so I checked and found the inState() function would still return true if it's test parm was empty. The comment says it should return true so I added some code to return true when test is empty. 

Was also wonder if there was a reason why you did not use state.Contains(t) rather than looping over state and checking each value? I think the built in Contains() function dose pretty much the same thing?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants